<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>PlPN::DocumentEventSink - The document event sink</title>
<link rel="stylesheet" href="../PlPN.css" type="text/css" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:" />
</head>

<body>


<!-- INDEX BEGIN -->
<div name="index">
<p><a name="__index__"></a></p>

<ul>

	<li><a href="#name">NAME</a></li>
	<li><a href="#synopsis">SYNOPSIS</a></li>
	<li><a href="#description">DESCRIPTION</a></li>
	<li><a href="#events">EVENTS</a></li>
	<li><a href="#copyright_and_licence">COPYRIGHT and LICENCE</a></li>
</ul>

<hr name="index" />
</div>
<!-- INDEX END -->

<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>PlPN::DocumentEventSink - The document event sink</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
        {
                package MyDocumentEventSinkWithUniqueClassName;
                use PlPN;
                our @ISA = qw(PlPN::DocumentEventSink);
                
                sub OnSchemeChange {
                        # do something
                }
                
                # etc.
        } # scope ends; return to original package
        
        use PlPN qw(PN);
        
        my $docsink = new MyDocumentEventSinkWithUniqueClassName;
        $some_doc-&gt;AddEventSink($docsink);
        
        # etc.</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>Catches document events from Programmer's Notepad documents.</p>
<p>The default constructor simply blesses an empty hashref into the class.</p>
<p>The default events do nothing; they exist so that derived classes can omit
them without causing Perl to crash when C++ code tries to call the event.</p>
<p>The document object is always passed as the first parameter of an event;
this allows the same document sink to be used with multiple documents.</p>
<p>
</p>
<hr />
<h1><a name="events">EVENTS</a></h1>
<dl>
<dt><strong><a name="onschemechange" class="item">OnSchemeChange($doc, $scheme)</a></strong></dt>

<dt><strong><a name="ondocclosing" class="item">OnDocClosing($doc)</a></strong></dt>

<dt><strong><a name="onafterload" class="item">OnAfterLoad($doc)</a></strong></dt>

<dt><strong><a name="onbeforesave" class="item">OnBeforeSave($doc, $filename)</a></strong></dt>

<dt><strong><a name="onaftersave" class="item">OnAfterSave($doc)</a></strong></dt>

<dt><strong><a name="onmodifiedchanged" class="item">OnModifiedChanged($doc)</a></strong></dt>

<dt><strong><a name="onwriteprotectchanged" class="item">OnWriteProtectChanged($doc)</a></strong></dt>

<dd>
<p>See <a href="./registerevent.html">PlPN::RegisterEvent</a> for descriptions of these
events.</p>
</dd>
</dl>
<p>
</p>
<hr />
<h1><a name="copyright_and_licence">COPYRIGHT and LICENCE</a></h1>
<p>Copyright (c) 2012 Sean Healy. All rights reserved.</p>
<p>This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.</p>

</body>

</html>
